3.5.93 \(\int \frac {\sqrt {1+x} \sqrt {1-x+x^2}}{x} \, dx\) [493]

Optimal. Leaf size=66 \[ \frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}-\frac {2 \sqrt {1+x} \sqrt {1-x+x^2} \tanh ^{-1}\left (\sqrt {1+x^3}\right )}{3 \sqrt {1+x^3}} \]

[Out]

2/3*(1+x)^(1/2)*(x^2-x+1)^(1/2)-2/3*arctanh((x^3+1)^(1/2))*(1+x)^(1/2)*(x^2-x+1)^(1/2)/(x^3+1)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {929, 272, 52, 65, 213} \begin {gather*} \frac {2}{3} \sqrt {x+1} \sqrt {x^2-x+1}-\frac {2 \sqrt {x+1} \sqrt {x^2-x+1} \tanh ^{-1}\left (\sqrt {x^3+1}\right )}{3 \sqrt {x^3+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Sqrt[1 + x]*Sqrt[1 - x + x^2])/x,x]

[Out]

(2*Sqrt[1 + x]*Sqrt[1 - x + x^2])/3 - (2*Sqrt[1 + x]*Sqrt[1 - x + x^2]*ArcTanh[Sqrt[1 + x^3]])/(3*Sqrt[1 + x^3
])

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 929

Int[((g_.)*(x_))^(n_)*((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(d
+ e*x)^FracPart[p]*((a + b*x + c*x^2)^FracPart[p]/(a*d + c*e*x^3)^FracPart[p]), Int[(g*x)^n*(a*d + c*e*x^3)^p,
 x], x] /; FreeQ[{a, b, c, d, e, g, m, n, p}, x] && EqQ[m - p, 0] && EqQ[b*d + a*e, 0] && EqQ[c*d + b*e, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {1+x} \sqrt {1-x+x^2}}{x} \, dx &=\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \int \frac {\sqrt {1+x^3}}{x} \, dx}{\sqrt {1+x^3}}\\ &=\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x}}{x} \, dx,x,x^3\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}+\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,x^3\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}+\frac {\left (2 \sqrt {1+x} \sqrt {1-x+x^2}\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+x^3}\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}-\frac {2 \sqrt {1+x} \sqrt {1-x+x^2} \tanh ^{-1}\left (\sqrt {1+x^3}\right )}{3 \sqrt {1+x^3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 15.33, size = 48, normalized size = 0.73 \begin {gather*} \frac {2}{3} \left (\sqrt {1+x} \sqrt {1-x+x^2}-\tanh ^{-1}\left (\sqrt {1+x} \sqrt {1-x+x^2}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[1 + x]*Sqrt[1 - x + x^2])/x,x]

[Out]

(2*(Sqrt[1 + x]*Sqrt[1 - x + x^2] - ArcTanh[Sqrt[1 + x]*Sqrt[1 - x + x^2]]))/3

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 43, normalized size = 0.65

method result size
default \(-\frac {2 \sqrt {1+x}\, \sqrt {x^{2}-x +1}\, \left (-\sqrt {x^{3}+1}+\arctanh \left (\sqrt {x^{3}+1}\right )\right )}{3 \sqrt {x^{3}+1}}\) \(43\)
elliptic \(\frac {\sqrt {\left (1+x \right ) \left (x^{2}-x +1\right )}\, \left (\frac {2 \sqrt {x^{3}+1}}{3}-\frac {2 \arctanh \left (\sqrt {x^{3}+1}\right )}{3}\right )}{\sqrt {1+x}\, \sqrt {x^{2}-x +1}}\) \(51\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+x)^(1/2)*(x^2-x+1)^(1/2)/x,x,method=_RETURNVERBOSE)

[Out]

-2/3*(1+x)^(1/2)*(x^2-x+1)^(1/2)*(-(x^3+1)^(1/2)+arctanh((x^3+1)^(1/2)))/(x^3+1)^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(1/2)*(x^2-x+1)^(1/2)/x,x, algorithm="maxima")

[Out]

integrate(sqrt(x^2 - x + 1)*sqrt(x + 1)/x, x)

________________________________________________________________________________________

Fricas [A]
time = 2.01, size = 60, normalized size = 0.91 \begin {gather*} \frac {2}{3} \, \sqrt {x^{2} - x + 1} \sqrt {x + 1} - \frac {1}{3} \, \log \left (\sqrt {x^{2} - x + 1} \sqrt {x + 1} + 1\right ) + \frac {1}{3} \, \log \left (\sqrt {x^{2} - x + 1} \sqrt {x + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(1/2)*(x^2-x+1)^(1/2)/x,x, algorithm="fricas")

[Out]

2/3*sqrt(x^2 - x + 1)*sqrt(x + 1) - 1/3*log(sqrt(x^2 - x + 1)*sqrt(x + 1) + 1) + 1/3*log(sqrt(x^2 - x + 1)*sqr
t(x + 1) - 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {x + 1} \sqrt {x^{2} - x + 1}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)**(1/2)*(x**2-x+1)**(1/2)/x,x)

[Out]

Integral(sqrt(x + 1)*sqrt(x**2 - x + 1)/x, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(1/2)*(x^2-x+1)^(1/2)/x,x, algorithm="giac")

[Out]

integrate(sqrt(x^2 - x + 1)*sqrt(x + 1)/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {x+1}\,\sqrt {x^2-x+1}}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x + 1)^(1/2)*(x^2 - x + 1)^(1/2))/x,x)

[Out]

int(((x + 1)^(1/2)*(x^2 - x + 1)^(1/2))/x, x)

________________________________________________________________________________________